<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>django.core.urlresolvers utility functions &mdash; Django 1.7.8.dev20150401230226 documentation</title>
    
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '1.7.8.dev20150401230226',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="top" title="Django 1.7.8.dev20150401230226 documentation" href="../index.html" />
    <link rel="up" title="API Reference" href="index.html" />
    <link rel="next" title="django.conf.urls utility functions" href="urls.html" />
    <link rel="prev" title="Unicode data" href="unicode.html" />



 
<script type="text/javascript" src="../templatebuiltins.js"></script>
<script type="text/javascript">
(function($) {
    if (!django_template_builtins) {
       // templatebuiltins.js missing, do nothing.
       return;
    }
    $(document).ready(function() {
        // Hyperlink Django template tags and filters
        var base = "templates/builtins.html";
        if (base == "#") {
            // Special case for builtins.html itself
            base = "";
        }
        // Tags are keywords, class '.k'
        $("div.highlight\\-html\\+django span.k").each(function(i, elem) {
             var tagname = $(elem).text();
             if ($.inArray(tagname, django_template_builtins.ttags) != -1) {
                 var fragment = tagname.replace(/_/, '-');
                 $(elem).html("<a href='" + base + "#" + fragment + "'>" + tagname + "</a>");
             }
        });
        // Filters are functions, class '.nf'
        $("div.highlight\\-html\\+django span.nf").each(function(i, elem) {
             var filtername = $(elem).text();
             if ($.inArray(filtername, django_template_builtins.tfilters) != -1) {
                 var fragment = filtername.replace(/_/, '-');
                 $(elem).html("<a href='" + base + "#" + fragment + "'>" + filtername + "</a>");
             }
        });
    });
})(jQuery);
</script>


  </head>
  <body>

    <div class="document">
  <div id="custom-doc" class="yui-t6">
    <div id="hd">
      <h1><a href="../index.html">Django 1.7.8.dev20150401230226 documentation</a></h1>
      <div id="global-nav">
        <a title="Home page" href="../index.html">Home</a>  |
        <a title="Table of contents" href="../contents.html">Table of contents</a>  |
        <a title="Global index" href="../genindex.html">Index</a>  |
        <a title="Module index" href="../py-modindex.html">Modules</a>
      </div>
      <div class="nav">
    &laquo; <a href="unicode.html" title="Unicode data">previous</a>
     |
    <a href="index.html" title="API Reference" accesskey="U">up</a>
   |
    <a href="urls.html" title="&lt;tt class=&#34;docutils literal&#34;&gt;&lt;span class=&#34;pre&#34;&gt;django.conf.urls&lt;/span&gt;&lt;/tt&gt; utility functions">next</a> &raquo;</div>
    </div>

    <div id="bd">
      <div id="yui-main">
        <div class="yui-b">
          <div class="yui-g" id="ref-urlresolvers">
            
  <div class="section" id="s-module-django.core.urlresolvers">
<span id="s-django-core-urlresolvers-utility-functions"></span><span id="module-django.core.urlresolvers"></span><span id="django-core-urlresolvers-utility-functions"></span><h1><tt class="docutils literal"><span class="pre">django.core.urlresolvers</span></tt> utility functions<a class="headerlink" href="#module-django.core.urlresolvers" title="Permalink to this headline">¶</a></h1>
<div class="section" id="s-reverse">
<span id="reverse"></span><h2>reverse()<a class="headerlink" href="#reverse" title="Permalink to this headline">¶</a></h2>
<p>If you need to use something similar to the <a class="reference internal" href="templates/builtins.html#std:templatetag-url"><tt class="xref std std-ttag docutils literal"><span class="pre">url</span></tt></a> template tag in
your code, Django provides the following function:</p>
<dl class="function">
<dt id="django.core.urlresolvers.reverse">
<tt class="descname">reverse</tt>(<em>viewname</em><span class="optional">[</span>, <em>urlconf=None</em>, <em>args=None</em>, <em>kwargs=None</em>, <em>current_app=None</em><span class="optional">]</span>)<a class="reference internal" href="../_modules/django/core/urlresolvers.html#reverse"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#django.core.urlresolvers.reverse" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<p><tt class="docutils literal"><span class="pre">viewname</span></tt> can be a string containing the Python path to the view object, a
<a class="reference internal" href="../topics/http/urls.html#naming-url-patterns"><em>URL pattern name</em></a>, or the callable view object.
For example, given the following <tt class="docutils literal"><span class="pre">url</span></tt>:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">url</span><span class="p">(</span><span class="s">r&#39;^archive/$&#39;</span><span class="p">,</span> <span class="s">&#39;news.views.archive&#39;</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s">&#39;news_archive&#39;</span><span class="p">)</span>
</pre></div>
</div>
<p>you can use any of the following to reverse the URL:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="c"># using the Python path</span>
<span class="n">reverse</span><span class="p">(</span><span class="s">&#39;news.views.archive&#39;</span><span class="p">)</span>

<span class="c"># using the named URL</span>
<span class="n">reverse</span><span class="p">(</span><span class="s">&#39;news_archive&#39;</span><span class="p">)</span>

<span class="c"># passing a callable object</span>
<span class="kn">from</span> <span class="nn">news</span> <span class="kn">import</span> <span class="n">views</span>
<span class="n">reverse</span><span class="p">(</span><span class="n">views</span><span class="o">.</span><span class="n">archive</span><span class="p">)</span>
</pre></div>
</div>
<p>If the URL accepts arguments, you may pass them in <tt class="docutils literal"><span class="pre">args</span></tt>. For example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">django.core.urlresolvers</span> <span class="kn">import</span> <span class="n">reverse</span>

<span class="k">def</span> <span class="nf">myview</span><span class="p">(</span><span class="n">request</span><span class="p">):</span>
    <span class="k">return</span> <span class="n">HttpResponseRedirect</span><span class="p">(</span><span class="n">reverse</span><span class="p">(</span><span class="s">&#39;arch-summary&#39;</span><span class="p">,</span> <span class="n">args</span><span class="o">=</span><span class="p">[</span><span class="mi">1945</span><span class="p">]))</span>
</pre></div>
</div>
<p>You can also pass <tt class="docutils literal"><span class="pre">kwargs</span></tt> instead of <tt class="docutils literal"><span class="pre">args</span></tt>. For example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">reverse</span><span class="p">(</span><span class="s">&#39;admin:app_list&#39;</span><span class="p">,</span> <span class="n">kwargs</span><span class="o">=</span><span class="p">{</span><span class="s">&#39;app_label&#39;</span><span class="p">:</span> <span class="s">&#39;auth&#39;</span><span class="p">})</span>
<span class="go">&#39;/admin/auth/&#39;</span>
</pre></div>
</div>
<p><tt class="docutils literal"><span class="pre">args</span></tt> and <tt class="docutils literal"><span class="pre">kwargs</span></tt> cannot be passed to <tt class="docutils literal"><span class="pre">reverse()</span></tt> at the same time.</p>
<p>If no match can be made, <tt class="docutils literal"><span class="pre">reverse()</span></tt> raises a
<a class="reference internal" href="exceptions.html#django.core.urlresolvers.NoReverseMatch" title="django.core.urlresolvers.NoReverseMatch"><tt class="xref py py-class docutils literal"><span class="pre">NoReverseMatch</span></tt></a> exception.</p>
<p>The <tt class="docutils literal"><span class="pre">reverse()</span></tt> function can reverse a large variety of regular expression
patterns for URLs, but not every possible one. The main restriction at the
moment is that the pattern cannot contain alternative choices using the
vertical bar (<tt class="docutils literal"><span class="pre">&quot;|&quot;</span></tt>) character. You can quite happily use such patterns for
matching against incoming URLs and sending them off to views, but you cannot
reverse such patterns.</p>
<p>The <tt class="docutils literal"><span class="pre">current_app</span></tt> argument allows you to provide a hint to the resolver
indicating the application to which the currently executing view belongs.
This <tt class="docutils literal"><span class="pre">current_app</span></tt> argument is used as a hint to resolve application
namespaces into URLs on specific application instances, according to the
<a class="reference internal" href="../topics/http/urls.html#topics-http-reversing-url-namespaces"><em>namespaced URL resolution strategy</em></a>.</p>
<p>The <tt class="docutils literal"><span class="pre">urlconf</span></tt> argument is the URLconf module containing the url patterns to
use for reversing. By default, the root URLconf for the current thread is used.</p>
<div class="admonition-make-sure-your-views-are-all-correct admonition">
<p class="first admonition-title">Make sure your views are all correct.</p>
<p>As part of working out which URL names map to which patterns, the
<tt class="docutils literal"><span class="pre">reverse()</span></tt> function has to import all of your URLconf files and examine
the name of each view. This involves importing each view function. If
there are <em>any</em> errors whilst importing any of your view functions, it
will cause <tt class="docutils literal"><span class="pre">reverse()</span></tt> to raise an error, even if that view function is
not the one you are trying to reverse.</p>
<p class="last">Make sure that any views you reference in your URLconf files exist and can
be imported correctly. Do not include lines that reference views you
haven&#8217;t written yet, because those views will not be importable.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p>The string returned by <tt class="docutils literal"><span class="pre">reverse()</span></tt> is already
<a class="reference internal" href="unicode.html#uri-and-iri-handling"><em>urlquoted</em></a>. For example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">reverse</span><span class="p">(</span><span class="s">&#39;cities&#39;</span><span class="p">,</span> <span class="n">args</span><span class="o">=</span><span class="p">[</span><span class="s">u&#39;Orléans&#39;</span><span class="p">])</span>
<span class="go">&#39;.../Orl%C3%A9ans/&#39;</span>
</pre></div>
</div>
<p class="last">Applying further encoding (such as <a class="reference internal" href="utils.html#django.utils.http.urlquote" title="django.utils.http.urlquote"><tt class="xref py py-meth docutils literal"><span class="pre">urlquote()</span></tt></a> or
<tt class="docutils literal"><span class="pre">urllib.quote</span></tt>) to the output of <tt class="docutils literal"><span class="pre">reverse()</span></tt> may produce undesirable
results.</p>
</div>
</div>
<div class="section" id="s-reverse-lazy">
<span id="reverse-lazy"></span><h2>reverse_lazy()<a class="headerlink" href="#reverse-lazy" title="Permalink to this headline">¶</a></h2>
<p>A lazily evaluated version of <a class="reference internal" href="#reverse">reverse()</a>.</p>
<dl class="function">
<dt id="django.core.urlresolvers.reverse_lazy">
<tt class="descname">reverse_lazy</tt>(<em>viewname</em><span class="optional">[</span>, <em>urlconf=None</em>, <em>args=None</em>, <em>kwargs=None</em>, <em>current_app=None</em><span class="optional">]</span>)<a class="headerlink" href="#django.core.urlresolvers.reverse_lazy" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<p>It is useful for when you need to use a URL reversal before your project&#8217;s
URLConf is loaded. Some common cases where this function is necessary are:</p>
<ul class="simple">
<li>providing a reversed URL as the <tt class="docutils literal"><span class="pre">url</span></tt> attribute of a generic class-based
view.</li>
<li>providing a reversed URL to a decorator (such as the <tt class="docutils literal"><span class="pre">login_url</span></tt> argument
for the <a class="reference internal" href="../topics/auth/default.html#django.contrib.auth.decorators.permission_required" title="django.contrib.auth.decorators.permission_required"><tt class="xref py py-func docutils literal"><span class="pre">django.contrib.auth.decorators.permission_required()</span></tt></a>
decorator).</li>
<li>providing a reversed URL as a default value for a parameter in a function&#8217;s
signature.</li>
</ul>
</div>
<div class="section" id="s-resolve">
<span id="resolve"></span><h2>resolve()<a class="headerlink" href="#resolve" title="Permalink to this headline">¶</a></h2>
<p>The <tt class="docutils literal"><span class="pre">resolve()</span></tt> function can be used for resolving URL paths to the
corresponding view functions. It has the following signature:</p>
<dl class="function">
<dt id="django.core.urlresolvers.resolve">
<tt class="descname">resolve</tt>(<em>path</em>, <em>urlconf=None</em>)<a class="reference internal" href="../_modules/django/core/urlresolvers.html#resolve"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#django.core.urlresolvers.resolve" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<p><tt class="docutils literal"><span class="pre">path</span></tt> is the URL path you want to resolve. As with
<a class="reference internal" href="#django.core.urlresolvers.reverse" title="django.core.urlresolvers.reverse"><tt class="xref py py-func docutils literal"><span class="pre">reverse()</span></tt></a>, you don&#8217;t need to
worry about the <tt class="docutils literal"><span class="pre">urlconf</span></tt> parameter. The function returns a
<a class="reference internal" href="#django.core.urlresolvers.ResolverMatch" title="django.core.urlresolvers.ResolverMatch"><tt class="xref py py-class docutils literal"><span class="pre">ResolverMatch</span></tt></a> object that allows you
to access various meta-data about the resolved URL.</p>
<p>If the URL does not resolve, the function raises a
<a class="reference internal" href="exceptions.html#django.core.urlresolvers.Resolver404" title="django.core.urlresolvers.Resolver404"><tt class="xref py py-exc docutils literal"><span class="pre">Resolver404</span></tt></a> exception (a subclass of
<a class="reference internal" href="../topics/http/views.html#django.http.Http404" title="django.http.Http404"><tt class="xref py py-class docutils literal"><span class="pre">Http404</span></tt></a>) .</p>
<dl class="class">
<dt id="django.core.urlresolvers.ResolverMatch">
<em class="property">class </em><tt class="descname">ResolverMatch</tt><a class="reference internal" href="../_modules/django/core/urlresolvers.html#ResolverMatch"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#django.core.urlresolvers.ResolverMatch" title="Permalink to this definition">¶</a></dt>
<dd><dl class="attribute">
<dt id="django.core.urlresolvers.ResolverMatch.func">
<tt class="descname">func</tt><a class="headerlink" href="#django.core.urlresolvers.ResolverMatch.func" title="Permalink to this definition">¶</a></dt>
<dd><p>The view function that would be used to serve the URL</p>
</dd></dl>

<dl class="attribute">
<dt id="django.core.urlresolvers.ResolverMatch.args">
<tt class="descname">args</tt><a class="headerlink" href="#django.core.urlresolvers.ResolverMatch.args" title="Permalink to this definition">¶</a></dt>
<dd><p>The arguments that would be passed to the view function, as
parsed from the URL.</p>
</dd></dl>

<dl class="attribute">
<dt id="django.core.urlresolvers.ResolverMatch.kwargs">
<tt class="descname">kwargs</tt><a class="headerlink" href="#django.core.urlresolvers.ResolverMatch.kwargs" title="Permalink to this definition">¶</a></dt>
<dd><p>The keyword arguments that would be passed to the view
function, as parsed from the URL.</p>
</dd></dl>

<dl class="attribute">
<dt id="django.core.urlresolvers.ResolverMatch.url_name">
<tt class="descname">url_name</tt><a class="headerlink" href="#django.core.urlresolvers.ResolverMatch.url_name" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the URL pattern that matches the URL.</p>
</dd></dl>

<dl class="attribute">
<dt id="django.core.urlresolvers.ResolverMatch.app_name">
<tt class="descname">app_name</tt><a class="headerlink" href="#django.core.urlresolvers.ResolverMatch.app_name" title="Permalink to this definition">¶</a></dt>
<dd><p>The application namespace for the URL pattern that matches the
URL.</p>
</dd></dl>

<dl class="attribute">
<dt id="django.core.urlresolvers.ResolverMatch.namespace">
<tt class="descname">namespace</tt><a class="reference internal" href="../_modules/django/core/urlresolvers.html#ResolverMatch.namespace"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#django.core.urlresolvers.ResolverMatch.namespace" title="Permalink to this definition">¶</a></dt>
<dd><p>The instance namespace for the URL pattern that matches the
URL.</p>
</dd></dl>

<dl class="attribute">
<dt id="django.core.urlresolvers.ResolverMatch.namespaces">
<tt class="descname">namespaces</tt><a class="headerlink" href="#django.core.urlresolvers.ResolverMatch.namespaces" title="Permalink to this definition">¶</a></dt>
<dd><p>The list of individual namespace components in the full
instance namespace for the URL pattern that matches the URL.
i.e., if the namespace is <tt class="docutils literal"><span class="pre">foo:bar</span></tt>, then namespaces will be
<tt class="docutils literal"><span class="pre">['foo',</span> <span class="pre">'bar']</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="django.core.urlresolvers.ResolverMatch.view_name">
<tt class="descname">view_name</tt><a class="reference internal" href="../_modules/django/core/urlresolvers.html#ResolverMatch.view_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#django.core.urlresolvers.ResolverMatch.view_name" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the view that matches the URL, including the namespace if
there is one.</p>
</dd></dl>

</dd></dl>

<p>A <a class="reference internal" href="#django.core.urlresolvers.ResolverMatch" title="django.core.urlresolvers.ResolverMatch"><tt class="xref py py-class docutils literal"><span class="pre">ResolverMatch</span></tt></a> object can then be interrogated to provide
information about the URL pattern that matches a URL:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="c"># Resolve a URL</span>
<span class="n">match</span> <span class="o">=</span> <span class="n">resolve</span><span class="p">(</span><span class="s">&#39;/some/path/&#39;</span><span class="p">)</span>
<span class="c"># Print the URL pattern that matches the URL</span>
<span class="k">print</span><span class="p">(</span><span class="n">match</span><span class="o">.</span><span class="n">url_name</span><span class="p">)</span>
</pre></div>
</div>
<p>A <a class="reference internal" href="#django.core.urlresolvers.ResolverMatch" title="django.core.urlresolvers.ResolverMatch"><tt class="xref py py-class docutils literal"><span class="pre">ResolverMatch</span></tt></a> object can also be assigned to a triple:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">func</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">kwargs</span> <span class="o">=</span> <span class="n">resolve</span><span class="p">(</span><span class="s">&#39;/some/path/&#39;</span><span class="p">)</span>
</pre></div>
</div>
<p>One possible use of <a class="reference internal" href="#django.core.urlresolvers.resolve" title="django.core.urlresolvers.resolve"><tt class="xref py py-func docutils literal"><span class="pre">resolve()</span></tt></a> would be to test
whether a view would raise a <tt class="docutils literal"><span class="pre">Http404</span></tt> error before redirecting to it:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">django.core.urlresolvers</span> <span class="kn">import</span> <span class="n">resolve</span>
<span class="kn">from</span> <span class="nn">django.http</span> <span class="kn">import</span> <span class="n">HttpResponseRedirect</span><span class="p">,</span> <span class="n">Http404</span>
<span class="kn">from</span> <span class="nn">django.utils.six.moves.urllib.parse</span> <span class="kn">import</span> <span class="n">urlparse</span>

<span class="k">def</span> <span class="nf">myview</span><span class="p">(</span><span class="n">request</span><span class="p">):</span>
    <span class="nb">next</span> <span class="o">=</span> <span class="n">request</span><span class="o">.</span><span class="n">META</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s">&#39;HTTP_REFERER&#39;</span><span class="p">,</span> <span class="bp">None</span><span class="p">)</span> <span class="ow">or</span> <span class="s">&#39;/&#39;</span>
    <span class="n">response</span> <span class="o">=</span> <span class="n">HttpResponseRedirect</span><span class="p">(</span><span class="nb">next</span><span class="p">)</span>

    <span class="c"># modify the request and response as required, e.g. change locale</span>
    <span class="c"># and set corresponding locale cookie</span>

    <span class="n">view</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">kwargs</span> <span class="o">=</span> <span class="n">resolve</span><span class="p">(</span><span class="n">urlparse</span><span class="p">(</span><span class="nb">next</span><span class="p">)[</span><span class="mi">2</span><span class="p">])</span>
    <span class="n">kwargs</span><span class="p">[</span><span class="s">&#39;request&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">request</span>
    <span class="k">try</span><span class="p">:</span>
        <span class="n">view</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
    <span class="k">except</span> <span class="n">Http404</span><span class="p">:</span>
        <span class="k">return</span> <span class="n">HttpResponseRedirect</span><span class="p">(</span><span class="s">&#39;/&#39;</span><span class="p">)</span>
    <span class="k">return</span> <span class="n">response</span>
</pre></div>
</div>
</div>
<div class="section" id="s-get-script-prefix">
<span id="get-script-prefix"></span><h2>get_script_prefix()<a class="headerlink" href="#get-script-prefix" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="django.core.urlresolvers.get_script_prefix">
<tt class="descname">get_script_prefix</tt>()<a class="reference internal" href="../_modules/django/core/urlresolvers.html#get_script_prefix"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#django.core.urlresolvers.get_script_prefix" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<p>Normally, you should always use <a class="reference internal" href="#django.core.urlresolvers.reverse" title="django.core.urlresolvers.reverse"><tt class="xref py py-func docutils literal"><span class="pre">reverse()</span></tt></a> to
define URLs within your application. However, if your application constructs
part of the URL hierarchy itself, you may occasionally need to generate URLs.
In that case, you need to be able to find the base URL of the Django project
within its Web server (normally, <a class="reference internal" href="#django.core.urlresolvers.reverse" title="django.core.urlresolvers.reverse"><tt class="xref py py-func docutils literal"><span class="pre">reverse()</span></tt></a>
takes care of this for you). In that case, you can call
<tt class="docutils literal"><span class="pre">get_script_prefix()</span></tt>, which will return the script prefix portion of the URL
for your Django project. If your Django project is at the root of its web
server, this is always <tt class="docutils literal"><span class="pre">&quot;/&quot;</span></tt>.</p>
</div>
</div>


          </div>
        </div>
      </div>
      
        
          <div class="yui-b" id="sidebar">
            
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../contents.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#"><tt class="docutils literal"><span class="pre">django.core.urlresolvers</span></tt> utility functions</a><ul>
<li><a class="reference internal" href="#reverse">reverse()</a></li>
<li><a class="reference internal" href="#reverse-lazy">reverse_lazy()</a></li>
<li><a class="reference internal" href="#resolve">resolve()</a></li>
<li><a class="reference internal" href="#get-script-prefix">get_script_prefix()</a></li>
</ul>
</li>
</ul>

  <h3>Browse</h3>
  <ul>
    
      <li>Prev: <a href="unicode.html">Unicode data</a></li>
    
    
      <li>Next: <a href="urls.html"><tt class="docutils literal"><span class="pre">django.conf.urls</span></tt> utility functions</a></li>
    
  </ul>
  <h3>You are here:</h3>
  <ul>
      <li>
        <a href="../index.html">Django 1.7.8.dev20150401230226 documentation</a>
        
          <ul><li><a href="index.html">API Reference</a>
        
        <ul><li><tt class="docutils literal"><span class="pre">django.core.urlresolvers</span></tt> utility functions</li></ul>
        </li></ul>
      </li>
  </ul>

  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/ref/urlresolvers.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
              <h3>Last update:</h3>
              <p class="topless">Apr 02, 2015</p>
          </div>
        
      
    </div>

    <div id="ft">
      <div class="nav">
    &laquo; <a href="unicode.html" title="Unicode data">previous</a>
     |
    <a href="index.html" title="API Reference" accesskey="U">up</a>
   |
    <a href="urls.html" title="&lt;tt class=&#34;docutils literal&#34;&gt;&lt;span class=&#34;pre&#34;&gt;django.conf.urls&lt;/span&gt;&lt;/tt&gt; utility functions">next</a> &raquo;</div>
    </div>
  </div>

      <div class="clearer"></div>
    </div>
  </body>
</html>